home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVERRMSG.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  1KB  |  38 lines

  1. /*=======================================================*/
  2. /*  TVERRMSG.C                                           */
  3. /*=======================================================*/
  4.  
  5. #include <string.h>
  6. #include "tvapi.h"
  7.  
  8. /*======================================================*/
  9. /* TVerrormsg  pop up TopView error message window      */
  10. /*   John Navas                                         */
  11. /*======================================================*/
  12.  
  13. /* win:    handle of window object (0=ME) */
  14. /* string: message text */
  15. /* tone:   1=sound a tone */
  16. /* button: 0=either, 1=left, 2=right, 3=either */
  17. /* rows:   number of rows, 0=default */
  18. /* cols:   number of columns, 0=default */
  19.  
  20. int pascal TVerrormsg(OBJECT win, char *string,int tone,int button,int rows,int cols)
  21. {
  22.    WORD bx, dx;
  23.  
  24.    bx = (strlen(string) & 0x1FFF) | ((button & 3) << 13) | ((tone & 1) << 15) ;
  25.    dx = win ? OBJSEG(win) : OBJSEG(TVobject(ME)) ;
  26.    _ES = FP_SEG((char far *)string);
  27.    _DI = FP_OFF((char far *)string);
  28.    _DX = dx ;
  29.    _BX = bx ;
  30.    _CH = cols ;
  31.    _CL = rows ;
  32.    _AX = 0x101F ;
  33.    geninterrupt(0x15) ;
  34.    return _BX ;
  35. }
  36.  
  37. /* End of TVERRMSG.C */
  38.